package com.ibeeking.found.cop.api.feign;

import com.ibeeking.found.cop.api.common.dto.CopEmployeeDTO;
import com.ibeeking.found.cop.api.feign.fallback.CopCpFeignFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * @Author ibeeking
 */
@FeignClient(name = "base-cop-cp-server", path = "/cp", contextId = "copFeignCpClient", fallbackFactory = CopCpFeignFallbackFactory.class, decode404 = true)
public interface CopCpFeignClient {
    /**
     * 根据openUserId查询员工信息
     *
     * @return
     */
    @PostMapping(value = "/contact/feign/v1/queryEmployeeByOpenUserId/{openUserId}")
    ResponseResult<CopEmployeeDTO> queryEmployeeByOpenUserId(@PathVariable("openUserId") String openUserId);

}
